package org.springds3.d2.test1;

import org.springds3.d2.dao.NewsTypeMapper;
import org.springds3.d2.pojo.NewsType;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test1 {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        NewsTypeMapper newsTypeMapper=(NewsTypeMapper) context.getBean("newsTypeMapper2");
        List<NewsType> newsTypeList= newsTypeMapper.getAllNewsTypes();
        for (int i=0;i<newsTypeList.size();i++){
            System.out.println(newsTypeList.get(i).getTypeName());
        }
    }
}
